// 仅示例
import request from "@/utils/request";
// export function getInfo (token) {
//   return request({
//     url: '/user/info',
//     method: 'get',
//     params: { token }
//   })
// }

// 登录的时候获取科室列表
export function loginAdmin(username) {
  return request({
    url: "blade-system/dept/dict/dept?username=" + username,
    method: "get",
  });
}

// 科室列表
export function adminList() {
  return request({
    url: "blade-system/dept/dict/en/inc",
    method: "get",
  });
}

export function login(data) {
  return request({
    url:
      "blade-auth/oauth/token?tenantId=" +
      "000000" +
      "&username=" +
      data.username +
      "&password=" +
      data.password +
      "&grant_type=password" +
      "&scope=all" +
      "&type=account",
    method: "post",
  });
}
// 获取二维码登录
export function startSign(data) {
  return request({
    url: "/bjCaSign/startSign",
    method: "get",
    params: {
      userAccount: data,
    },
  });
}

// 科室、主诊医师type - 列表
// /api/vtePatientInfo/searchPatientsByCondition
// deptIdList   部门id集合
// attendingDoctorCode	主诊医师code
// patientStatusInHospital		是否在院：0-否，1-是；当前默认1
// searchValue	模糊查询参数
export function gatherList(data) {
  return request({
    url: "vtePatientInfo/searchPatientsByCondition",
    method: "post",
    data: data,
  });
}
// 科室/主诊医师界面-右侧病患详情
export function searchPatient(data) {
  return request({
    url:
      "vtePatientInfo/searchPatient?patientId=" +
      data.patientId +
      "&admissionNumber=" +
      data.admissionNumber,
    method: "get",
  });
}

export function message() {
  return request({
    url: "/message",
    method: "get",
  });
}
